#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using pii = pair<int, int>;
#define rep(i, a, b) for (int i = (a); i <= (b); i++)
#define per(i, a, b) for (int i = (a); i >= (b); i--)
#define endl '\n'
const int N = 1e5 + 5;

int n, m;
int a[N];

pii partition(int l, int r) {
  int x = a[l + rand() % (r + 1 - l)];
  int first = l, last = r;
  int i = l;
  while (i <= last) {
    if (a[i] < x) {
      swap(a[i++], a[first++]);
    } else if (a[i] == x) {
      i++;
    } else {
      swap(a[i], a[last--]);
    }
  }
  return pii(first, last);
}
void qsort(int l, int r) {
  if (l >= r) return;
  pii res = partition(l, r);
  qsort(l, res.first - 1);
  qsort(res.second + 1, r);
}
int main() {
  ios::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  cin >> n;
  rep(i, 1, n) cin >> a[i];
  qsort(1, n);
  rep(i, 1, n) cout << a[i] << ' ';
  return 0;
}